Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add leave team button #11757

Merged
merged 9 commits into from
Dec 20, 2024
Merged

Add leave team button #11757

merged 9 commits into from
Dec 20, 2024

Conversation

nanaya
Copy link
Collaborator

@nanaya nanaya commented Dec 19, 2024

Apart of the message that needs fixing, I wonder if the route should have team id in it... (there's also question of if it's worth adding an OsuAuthorize check for this)

Comment on lines 18 to 21
$buttons = new Ds\Set();
if ($currentUser !== null && $currentUser->team?->getKey() === $team->getKey() && $currentUser->getKey() !== $team->leader_id) {
$buttons->add('part');
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there more buttons coming 👀

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why yes 👀

app/Http/Controllers/TeamsController.php Outdated Show resolved Hide resolved
method="POST"
>
<button class="team-action-button team-action-button--part">
{{ osu_trans('teams.show.bar.part') }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too many idents btw

@nanaya
Copy link
Collaborator Author

nanaya commented Dec 20, 2024

sec, I think it's more convenient to just add an OsuAuthorize check

@notbakaneko notbakaneko merged commit 3a3ab74 into ppy:master Dec 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants